import axios from 'axios'

const service = axios.create({
    baseURL: "http://116.205.143.25:3218/", // url = base url + request url
    timeout: 5000 // request timeout
})

service.interceptors.request.use(
    config => {
        return config
    },
    error => {
        return Promise.reject(error)
    }
)

service.interceptors.response.use(
    response => {
        return response.data
    },
    error => {
        return Promise.reject(error)
    }
)

export default service